YES 0.706 H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/Queue.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:



HASKELL
  ↳ BR

mainModule Queue
  ((deQueue :: Queue a  ->  Maybe (a,Queue a)) :: Queue a  ->  Maybe (a,Queue a))

module Queue where
  import qualified Prelude

  data Queue a = [a] [a] [a


  deQueue :: Queue a  ->  Maybe (a,Queue a)
deQueue (Q [] _ _) Nothing
deQueue (Q (x : xs) ys xs'Just (x,makeQ xs ys xs')

  listToQueue :: [a ->  Queue a
listToQueue xs Q xs [] xs

  makeQ :: [a ->  [a ->  [a ->  Queue a
makeQ xs ys [] listToQueue (rotate xs ys [])
makeQ xs ys (_ : xs'Q xs ys xs'

  rotate :: [a ->  [a ->  [a ->  [a]
rotate [] (y : _) zs y : zs
rotate (x : xs) (y : yszs x : rotate xs ys (y : zs)



Replaced joker patterns by fresh variables and removed binding patterns.

↳ HASKELL
  ↳ BR
HASKELL
      ↳ COR

mainModule Queue
  ((deQueue :: Queue a  ->  Maybe (a,Queue a)) :: Queue a  ->  Maybe (a,Queue a))

module Queue where
  import qualified Prelude

  data Queue a = [a] [a] [a


  deQueue :: Queue a  ->  Maybe (a,Queue a)
deQueue (Q [] vv vwNothing
deQueue (Q (x : xs) ys xs'Just (x,makeQ xs ys xs')

  listToQueue :: [a ->  Queue a
listToQueue xs Q xs [] xs

  makeQ :: [a ->  [a ->  [a ->  Queue a
makeQ xs ys [] listToQueue (rotate xs ys [])
makeQ xs ys (vx : xs'Q xs ys xs'

  rotate :: [a ->  [a ->  [a ->  [a]
rotate [] (y : vyzs y : zs
rotate (x : xs) (y : yszs x : rotate xs ys (y : zs)



Cond Reductions:
The following Function with conditions
undefined 
 | False
 = undefined

is transformed to
undefined  = undefined1

undefined0 True = undefined

undefined1  = undefined0 False



↳ HASKELL
  ↳ BR
    ↳ HASKELL
      ↳ COR
HASKELL
          ↳ Narrow

mainModule Queue
  (deQueue :: Queue a  ->  Maybe (a,Queue a))

module Queue where
  import qualified Prelude

  data Queue a = [a] [a] [a


  deQueue :: Queue a  ->  Maybe (a,Queue a)
deQueue (Q [] vv vwNothing
deQueue (Q (x : xs) ys xs'Just (x,makeQ xs ys xs')

  listToQueue :: [a ->  Queue a
listToQueue xs Q xs [] xs

  makeQ :: [a ->  [a ->  [a ->  Queue a
makeQ xs ys [] listToQueue (rotate xs ys [])
makeQ xs ys (vx : xs'Q xs ys xs'

  rotate :: [a ->  [a ->  [a ->  [a]
rotate [] (y : vyzs y : zs
rotate (x : xs) (y : yszs x : rotate xs ys (y : zs)



Haskell To QDPs


↳ HASKELL
  ↳ BR
    ↳ HASKELL
      ↳ COR
        ↳ HASKELL
          ↳ Narrow
QDP
              ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

new_rotate(:(wv50, wv51), :(wv60, wv61), wv7, wv8, h) → new_rotate(wv51, wv61, wv60, :(wv7, wv8), h)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: